import {UPDATE_PAGE_LOADING_STATE,CLEAR_LOGIN_DATA} from './mutation_type'
import UserToken from '../../api/user_token'

export default {
  [UPDATE_PAGE_LOADING_STATE](state,loading){
    state.pageLoading=loading
  },updateLeftMenulist(state,item){
    state.leftMenuList=item.list
  },updateOpenedSubmenuArr(state,arr){
    state.openedSubmenuArr=arr
  },[CLEAR_LOGIN_DATA](state){
    UserToken.clearCookie()
    state.openedSubmenuArr=[]
    localStorage.clear()
  }
};
